<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt"%>
<!DOCTYPE html>
<html>
<head>
<title>公告</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/indexSecond.css">
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/achievement.css">
</head>
<body>
<div class="container-fluid" style="padding: 0;position:relative;height: 50px;">
	<nav class="navbar  navbar-fixed-top" style="position:absolute;width:100%;height:55px;background:#1e52ac;" role="navigation" id="head">
		<div class="container clearfix">
			<!-- Collapsed navigation -->
	        <div class="navbar-header">
	            <!-- Expander button -->
	            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
	                <span class="sr-only">Toggle navigation</span>
	                <span class="icon-bar"></span>
	                <span class="icon-bar"></span>
	                <span class="icon-bar"></span>
	            </button>
	        </div>
	        <div class="navbar-collapse collapse" id="navbar">
	        	<!-- Main navigation -->
	        	<ul class="nav navbar-nav">
					<li style="border-bottom: 3px solid #fff;"><a href="<%=request.getContextPath()%>/index.do" style="color: #fff">首页</a></li>
					<li><a href="<%=request.getContextPath()%>/xqq.do">心情墙</a></li>
					<li><a href="<%=request.getContextPath()%>/xdjm.do">兄弟姐妹</a></li>
					<li><a href="<%=request.getContextPath()%>/jqhd.do">近期活动</a></li>
					<li><a href="<%=request.getContextPath()%>/yqlj.do">友情链接</a></li>
				</ul>
				<c:choose>
				<c:when test="${change=='0'}">
					<form action="" class="navbar-form navbar-right">
						<a data-toggle="modal" data-target="#myModal" class="btn btn-primary" href="">登录</a>
	                    <a class="btn btn-primary signup" href="">注册</a>
					</form>
				</c:when>
				<c:when test="${change=='1'}">
					<div class="after-login navbar-right">
						<div  class="col-sm-12 col-xs-12">
							<p>您好,用户:${member.membername}</p>
						</div>
						<div  class="modify col-sm-12 col-xs-12">
							<a data-toggle="modal" data-target="#changePsdModal" href="#">修改密码</a>
							<a data-toggle="modal" data-target="#changeMsgModal" href="#">修改信息</a>
							<a href="<%=request.getContextPath()%>/outlogin.do">注销</a>
						</div>
					</div>
				</c:when>
			 <c:when test="${change=='2'}">
					<div class="after-login navbar-right">
						<div  class="col-sm-12 col-xs-12">
							<p>您好,管理员:${member.membername}</p>
						</div>
						<div  class="modify col-sm-12 col-xs-12">
							<a data-toggle="modal" data-target="#changePsdModal" href="#">修改密码</a>
							<a data-toggle="modal" data-target="#changeMsgModal" href="#">修改信息</a>
							<a href="<%=request.getContextPath()%>/outlogin.do">注销</a>
						</div>
					</div>
				</c:when>
				</c:choose>
	        </div>
		</div>
	</nav>
</div>
<div class="modal fade"  tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" id="myModal" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header clearfix">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<img src="<%=request.getContextPath()%>/img/class-logo.png" class="img">
				<h1 class="modal-title" id="myModalLabel">登录</h1>
			</div>
			<form enctype="multipart/form-data" method="post" action="<%=request.getContextPath()%>/login.do">
				<div class="modal-body"> 
					<p><label>用户昵称:</label><input name="username" type="text" placeholder="请输入登录名或邮箱" class="user"></p>
					<p><label>密码:</label><input name="password" type="password" placeholder="请输入密码" class="user"></p>
				</div>
				<div class="modal-footer">
					<button type="submit" class="btn btn-default">登录</button>
				</div>
			</form>
		</div>
	</div>
</div>
<div class="modal fade"  tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" id="changePsdModal" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header clearfix">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h1 class="modal-title" id="myModalLabel">修改密码</h1>
			</div>
			<form enctype="multipart/form-data" method="post" action="<%=request.getContextPath()%>/fixpassword.do">
				<div class="modal-body"> 
					<p><label>登录密码:</label><input name="password" type="password" placeholder="请输入登录密码" class="user"></p>
					<p><label>重置登录密码:</label><input name="newpassword" type="password" placeholder="请输入重置的密码" class="user"></p>
					<p><label>E-mail:</label><input name="email" type="text" placeholder="请输入E-mail" class="user"></p>
					<p><label>手机号码:</label><input name="phone" type="text" placeholder="请输入手机号码" class="user"></p>
				</div>
				<div class="modal-footer">
					<button type="submit" class="btn btn-default">确定修改</button>
				</div>
			</form>
		</div>
	</div>
</div>
<div class="modal fade"  tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" id="changeMsgModal" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header clearfix">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h1 class="modal-title" id="myModalLabel">修改信息</h1>
			</div>
			<form enctype="multipart/form-data" method="post" action="<%=request.getContextPath()%>/fixinfo.do">
				<div class="modal-body"> 
					<p><label>用户昵称:</label><input name="membername" type="text" placeholder="请输入新的用户昵称" class="user" id="name" value="${member.membername }"></p>
					<p class="clearfix"><label style="float:left;">照片:</label><input name="file" type="file"  class="user" style="float:left;" id="photo"></p>
					<p><label>QQ:</label><input name="qq" type="text" placeholder="请输入新的QQ号" class="user" value="${member.qq}"></p>
					<p><label>微信:</label><input name="weixing" type="text" placeholder="请输入新的微信" class="user" value="${member.weixing }"></p>
					<p><label>微博:</label><input name="weibo" type="text" placeholder="请输入新的微博" class="user" value="${member.weibo }"></p>
					<p><label>座右铭:</label><input name="motto" type="text" placeholder="请输入新的座右铭" class="user" value="${member.motto }"></p>
					<p><label>自我介绍:</label><input name="introduce" type="textarea" placeholder="请输入新的自我介绍" class="user" value="${member.introduce }"></p>
				</div>
				<div class="modal-footer">
					<button type="submit" class="btn btn-default" id="btn">确定修改</button>
				</div>
			</form>
		</div>
	</div>
</div>
<div class="container">
	<div class="panel panel-default">
		<div class="panel-heading"><h1><center>新闻公告</center></h1></div>
		<div class="panel-body">
			<h2><center>${oneNew.title}</center></h2>
			<h5><center>创建人:${oneNew.creater}</center></h5>
			<div class="col-sm-12"><center><img src="<%=request.getContextPath()%>/${oneNew.picture}" class="img-responsive col"></center></div>
			<div class="content col-sm-12">
			<p>事件详情：</p>
		      <p>${oneNew.event}</p>
			</div>
		</div>
	</div>
</div>
</body>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-2.1.4.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/bootstrap.js"></script>
<script src="<%=request.getContextPath()%>/js/msgtest.js"></script>
</html>